package model;

import java.util.ArrayList;
import java.util.List;


public abstract class Observable {

	protected List<Observer> observers;
	
	protected Observable() {
		observers = new ArrayList<Observer>();
	}
	
	public void notifyObservers() {
		for (Observer observer : observers) {
			observer.update();
		}
	}
	
	public void register(Observer observer) {
		observers.add(observer);
	}
	
	
}
